﻿using System.ComponentModel;
using System;

namespace Eniux.Windows.Dock
{
    public class RequestDocumentCloseEventArgs : CancelEventArgs
    {
        public RequestDocumentCloseEventArgs(DocumentContent doc)
        {
            DocumentToClose = doc;
        }

        /// <summary>
        /// Document content that user wants to close
        /// </summary>
        public DocumentContent DocumentToClose { get; private set; }
    }

    /// <summary>
    /// 反序列化回调参数
    /// </summary>
    public class DeserializationCallbackEventArgs : EventArgs
    {
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="contentName">内容名称</param>
        public DeserializationCallbackEventArgs(string contentName)
        {
            Name = contentName;
        }

        /// <summary>
        /// 获取要反序列化的内容的名称
        /// </summary>
        public string Name { get; protected set; }

        /// <summary>
        /// 获取或设置反序列化的内容
        /// </summary>
        public ManagedContent Content { get; set; }
    }
}
